/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.pay;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

/**
<p>Title:PaymentCodePay</p>  
<p>Description: ΢��ˢ��/֧��������֧��</p>
 */
public class PaymentCodePay extends MerchantBaseRequest{
	
	private String notify_url;
	private String trade_no;//*����ش� [��Ӧ����]������ˮ��
	private String mer_trace;//*����ش� [��Ӧ����]�̻���ˮ��
	private String pay_type;//*����ش� ֧����ʽ WECHAT:΢�ţ� ALIPAY:֧������YL:������ά��
	private String amount;//*����ش� [��Ӧ����]���
	private String auth_code;//*����ش� ɨ��֧����Ȩ��
	private String remark;//��ע��Ϣ
	private String goods_id;//*����ش� ��ƷID
	private String goods_inf;//*����ش� ��Ʒ��Ϣ
	private String url = "/payment/paymentCodePay";

	private String settle_amt;//[��Ӧ����]������
	private String mer_check_date;//[��Ӧ����]�������ڣ���ʽ��YYYYMMDD
	private String order_id;//[��Ӧ����]�̻�Ψһ������
	private String mer_date;//[��Ӧ����]�̻����ڣ���ʽ��YYYYMMDD

	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public PaymentCodePay doRequest() throws Exception {
		Message<PaymentCodePay> response = UMFUtil.post(createAPIContext(), this,PaymentCodePay.class);
		MerchantBaseRequest baseResult = convertResult(response, PaymentCodePay.class);
		if(baseResult == null)
			return null;
		return (PaymentCodePay)baseResult;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getNotify_url() {
		return notify_url;
	}

	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	public String getMer_trace() {
		return mer_trace;
	}

	public void setMer_trace(String mer_trace) {
		this.mer_trace = mer_trace;
	}

	public String getTrade_no() {
		return trade_no;
	}

	public void setTrade_no(String trade_no) {
		this.trade_no = trade_no;
	}

	public String getPay_type() {
		return pay_type;
	}

	public void setPay_type(String pay_type) {
		this.pay_type = pay_type;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getOrder_id() {
		return order_id;
	}

	public void setOrder_id(String order_id) {
		this.order_id = order_id;
	}

	public String getMer_date() {
		return mer_date;
	}

	public void setMer_date(String mer_date) {
		this.mer_date = mer_date;
	}

	public String getAuth_code() {
		return auth_code;
	}

	public void setAuth_code(String auth_code) {
		this.auth_code = auth_code;
	}

	public String getGoods_id() {
		return goods_id;
	}

	public void setGoods_id(String goods_id) {
		this.goods_id = goods_id;
	}

	public String getGoods_inf() {
		return goods_inf;
	}

	public void setGoods_inf(String goods_inf) {
		this.goods_inf = goods_inf;
	}

	public String getSettle_amt() {
		return settle_amt;
	}

	public void setSettle_amt(String settle_amt) {
		this.settle_amt = settle_amt;
	}

	public String getMer_check_date() {
		return mer_check_date;
	}

	public void setMer_check_date(String mer_check_date) {
		this.mer_check_date = mer_check_date;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("PaymentCodePay [notify_url=");
		builder.append(notify_url);
		builder.append(", trade_no=");
		builder.append(trade_no);
		builder.append(", mer_trace=");
		builder.append(mer_trace);
		builder.append(", pay_type=");
		builder.append(pay_type);
		builder.append(", amount=");
		builder.append(amount);
		builder.append(", auth_code=");
		builder.append(auth_code);
		builder.append(", remark=");
		builder.append(remark);
		builder.append(", goods_id=");
		builder.append(goods_id);
		builder.append(", goods_inf=");
		builder.append(goods_inf);
		builder.append(", url=");
		builder.append(url);
		builder.append(", settle_amt=");
		builder.append(settle_amt);
		builder.append(", mer_check_date=");
		builder.append(mer_check_date);
		builder.append(", order_id=");
		builder.append(order_id);
		builder.append(", mer_date=");
		builder.append(mer_date);
		builder.append(", version=");
		builder.append(version);
		builder.append(", mer_id=");
		builder.append(mer_id);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}

}
